<style>
    .center{
        text-align: center;
    }
    .left{
        text-align: left;
    }
    .right{
        text-align: right;
    }
    .row{
        font-size: 1.5rem;
    }
</style>
    <div class="row">
        <div class="col-xs-10 ">
            <label class="col-xs-4">
                订单基本信息
            </label>
            <div class="col-xs-8">
            </div>
        </div>
    </div>
    <hr>
    <div class="row">
        <div class="col-xs-10">
            <label class="col-xs-2 right">
                系统编号：
            </label>
            <div class="col-xs-10 left">
                {$orderinfo.id}
            </div>
        </div>

        <div class="col-xs-10">
            <label class="col-xs-2 right">
                购买人信息：
            </label>
            <div class="col-xs-10 left">
                姓名：<label class="label label-danger">{$orderinfo.b_username}</label>
                手机号：<label class="label label-danger">￥{$orderinfo.b_selfphone}</label>
            </div>
        </div>
        <div class="col-xs-10">
            <label class="col-xs-2 right">
                产品信息：
            </label>
            <div class="col-xs-10 left">
                产品ID：{$orderinfo.productid}<br>
                产品名称：{$orderinfo.title}<br>
                合约收益：{$orderinfo.daynum}天/{$orderinfo.earnpercent}%<br>
            </div>
        </div>
        <div class="col-xs-10">
            <label class="col-xs-2 right">
                消费信息：
            </label>
            <div class="col-xs-10 left">
                订单消费：{$orderinfo.price}<br>
                预计收益：{$orderinfo.dayaddprice}<br>
                卖出后可得：{$orderinfo.basicprice}<br>
            </div>
        </div>

        <div class="col-xs-10">
            <label class="col-xs-2 right">
                匹配信息：
            </label>
            <div class="col-xs-10 left">
                匹配状态：{if $orderinfo.peiduistatus eq 1}未匹配{else/}已匹配{/if}
                {if $orderinfo.peiduistatus eq 2}
                配对人用户名:{$orderinfo.m_username}
                配对人手机号:{$orderinfo.m_selfphone}
                {/if}
            </div>
        </div>

        <div class="col-xs-10">
            <label class="col-xs-2 right">
                支付状态：
            </label>
            <div class="col-xs-10 left">
                {if $orderinfo['paystatus'] eq 0}
                未支付
                {/if}
                {if $orderinfo['paystatus'] neq 0}
                {if $orderinfo['paystatus'] eq 1}
                已付款
                {else/}
                已完成
                {/if}
                付款时间：{:date('Y-m-d H:i:s', $orderinfo.paytime)}
                付款截图：<a href="{$orderinfo.payimg}" target="_blank"><img src="{$orderinfo.payimg}" style="width:50px;height:50px;" /></a>
                {/if}
            </div>
        </div>
     </div>
    <div class="row">
        <div class="col-xs-10 ">
            <label class="col-xs-4">
                修改下单时间
            </label>
            <div class="col-xs-8">
            </div>
        </div>
    </div>
    <hr>
    <div class="row">

        <div class="col-xs-10">
            <label class="col-xs-2 right">
                下单时间：
            </label>
            <div class="col-xs-4 left">
                {include file="public/oneDateRangePicker" onepicker-name="ctime"}
                <input type="hidden" name="id" value="{$orderinfo.id}">
            </div>
            <div>
                <button type="button" onclick="changeCtime()" class="btn btn-success">确认设置</button>
            </div>
        </div>
    </div>

    <div class="row">
        <div class="col-xs-10 ">
            <label class="col-xs-4">
                收益信息
            </label>
            <div class="col-xs-8">
            </div>
        </div>
    </div>

    <hr>

	<div class="row">
		<div class="col-xs-10 center">
			<table class="table table-striped table-bordered">
				<thead>
				<tr>
					<th>系统编号</th>
					<th>收益日期</th>
					<th>预计收益</th>
					<th>当前状态</th>
				</tr>
				</thead>
				<tbody>
				{volist name="orderearns" id="og"}
				<tr>
					<td>{$og.id}</td>
					<td>{$og.dotime}</td>
					<td>￥{$og.earnmoney}</td>
					<td>
						{if $og.status eq 1}
						未发放
						{else}
						已发放
						{/if}
					</td>
				</tr>
				{/volist}
				</tbody>

			</table>
		</div>
	</div>


	<div class="row">
        <div class="col-xs-10 ">
            <label class="col-xs-4">
                SCB发放情况
            </label>
            <div class="col-xs-8"></div>
        </div>
    </div>

    <hr>

	<div class="row">
		<div class="col-xs-10 center">
			<table class="table table-striped table-bordered">
				<thead>
				<tr>
					<th>编号</th>
					<th>订单编号</th>
					<th>用户名</th>
					<th>真实姓名</th>
					<th>激活币操作</th>
					<th>待发放scb数量</th>
					<th>备注</th>
					<th>发放时间</th>
				</tr>
				</thead>
				<tbody>
				{volist name="botlist" id="item"}
					<tr>
						<td>{$item.id}</td>
						<td>{$item.orderid}
							 <a href="javascript:void(0)" onclick="modal('{:url(\'Order/orderInfo\',array(\'id\'=>$item[\'orderid\']))}', '订单详情', '80%', '80%')">
								订单详情
							 </a>
						</td>
						<td>{$item.uid|get_uname}</td>
						<td>{$item.uid|get_realname}</td>
						<td>
							{if condition="$item['state'] eq 1"}
								<label class="label label-danger">未到发放时间</label>
							{/if}
							{if condition="$item['state'] eq 2"}
								<label class="label label-success">已发放</label>
							{/if}
						</td>
						<td>{$item.botnum}</td>
						<td>
						   {$item.goodname}
						</td>
						<td>
							{$item.ctime|date='Y-m-d H:i:s',###}
						</td>
					</tr>
				{/volist}
				</tbody>

			</table>
		</div>
	</div>



	<script>
		function changeCtime(){
			let ctime = $("input[name='ctime']").val(), id=$("input[name='id']").val();
			$.post('{:url("Order/changeCtime")}', {id:id, ctime:ctime}, function (res) {
				let r = JSON.parse(res);
				layer.msg(r.info);
			});
		}
	</script>
